package com.shiminghui.String;

public class IdCad {
    public static void main(String[] args) {

        String id = "130433200410261313";

        String year = id.substring(6, 10);
        String month = id.substring(10, 12);
        String day = id.substring(12, 14);
        String gender = id.substring(16, 17);
        //char gender = id.charAt(16);

        System.out.println(year + "年" + month + "月" + day + "日");
        if ((gender.charAt(0)-'0')% 2 == 1) {
            gender = "男";
        } else {
            gender = "女";
        }

        System.out.println(gender);

    }
}
